module.exports = {
  /*
  ** Headers of the page
  */
  head: {
    title: 'nuxt',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' },
      { name: 'applicable-device', content: 'mobile'} 

    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
      { rel: 'dns-prefetch', href: '//static.kuaiyankanshu.net'} ,
      { rel: 'dns-prefetch', href: '//www.kuaiyankanshu.net'},
    ]
  },
  /*
  ** Customize the progress bar color
  */
  loading: false,
  /*
  ** Build configuration
  */
  build: {
    extractCSS: true,
    loaders:[
      {
        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
        loader:"url-loader",
        query:{
          limit: 1000,
          name:'img/[name].[hash].[ext]'
        }
      }
    ],
    /*
    ** Run ESLint on save
    */
    extend (config, { isDev, isClient }) {
      if (isDev && isClient) {
        // config.module.rules.push({
        //   enforce: 'pre',
        //   test: /\.(js|vue)$/,
        //   loader: 'eslint-loader',
        //   exclude: /(node_modules)/
        // })
      }
    }
  },
  plugins: [{
    src: '~plugins/main.js',
    ssr: true,
  },{
    src: '~assets/js/rem2px',
    ssr: false,
  }],
  css: [{
      src: '~assets/styles/styles.scss',
      lang: 'scss'
    },
    'mint-ui/lib/style.css'
  ],
  vendor:['mint-ui'],   //防止mint-ui被打包多次
}

